<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Medic Management System</title>
	<link href="<?php echo base_url();?>/assets/css/style.css" rel="stylesheet" type="text/css">
	<link href="<?php echo base_url();?>/assets/css/jquery.akordeon.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="<?php echo base_url();?>/assets/js/development-bundle/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>/assets/js/jquery-migrate-1.1.1.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>/assets/js/jquery.akordeon.js"></script>
	<script type="text/javascript">
        $(document).ready(function () {
            $('#buttons').akordeon();
            $('#button-less').akordeon({ buttons: true, toggle: false});
        });
		function changePage(url){
		$.ajax({
			url : url,
			success: function(msg){
				$( "#content" ).hide().html(msg).fadeIn(500);
			}
		});
		}
    </script>
</head>
<body>
	<div id="wrapper">
		<div id="container">
			<div id="header">
				<div id="frame1">
					<div id="logo">Medic Management System</div>
				</div>
			</div>
			<div id="side_bar">
				<div class="akordeon" id="button-less">
					<div class="akordeon-item">
						<div class="akordeon-item-head">
							<div class="akordeon-item-head-container">
								<div class="akordeon-heading">
									Master
								</div>
							</div>
						</div>
						<div class="akordeon-item-body">
							<a href="<?php echo site_url();?>/Obat"><p>Master Obat</p></a>
							<a href="<?php echo site_url();?>/Pasien"><p>Master Pasien</p></a>
							<a href="<?php echo site_url();?>/HistoryHarga"><p>Master Harga</p></a>
						</div>
					</div>
					<div class="akordeon-item expanded">
						<div class="akordeon-item-head">
							<div class="akordeon-item-head-container">
								<div class="akordeon-heading">
									Transaksi
								</div>
							</div>
						</div>
						<div class="akordeon-item-body">
							<a href="<?php echo site_url();?>/PenerimaanObat"><p>Penerimaan Obat</p></a>
							<a href="<?php echo site_url();?>/PengeluaranObat"><p>Pengeluaran Obat</p></a>
							<?php
							if($this->session->userdata("role") == 1){
							?>
							<a href="<?php echo site_url();?>/PenyesuaianObat"><p>Penyesuaian Obat</p></a>
							<?php
							}
							?>
						</div>
					</div>
					<div class="akordeon-item expanded">
						<div class="akordeon-item-head">
							<div class="akordeon-item-head-container">
								<div class="akordeon-heading">
									User Menu
								</div>
							</div>
						</div>
						<div class="akordeon-item-body">
							<a href="<?php echo site_url();?>/UbahPassword"><p>Ubah Password</p></a>
							<a href="<?php echo site_url();?>/Login/logout"><p>Logout</p></a>
						</div>
					</div>
				</div>
			</div>
			<div id="content">
				<?php echo $content; ?>
			</div>
			<div id="footer">
				<div id="info">Developed By : Zulmi Adi Rizki</div>
			</div>
		</div>
	</div>
</body>
</html>